import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home/Home'
import newslist from '@/views/Home/newslist'
import newsinfo from '@/views/Home/newsinfo'
import photos from '@/views/Home/photos'
import goodslist from '@/views/Home/Goods/goodslist'
import goodsinfo from '@/views/Home/Goods/goodsinfo'
import swiper from '@/views/Home/Goods/swiper'
import goodbox from '@/views/Home/Goods/goodbox'
import GoodsDesc from '@/views/Home/Goods/GoodsDesc'
import GoodsComment from '@/views/Home/Goods/GoodsComment'
import shopcar from '@/views/ShopCar/shopcar'
import search from '@/views/Search/search'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'mui-active',
  routes: [
     {
      path: '/',
      redirect:'/home'
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/home/newslist',
      name: 'newslist',
      component: newslist,
    },
    {
      path: '/home/newsinfo/:id',
      name: 'newsinfo',
      component: newsinfo,
    },
    {
      path: '/home/goodslist',
      name: 'goodslist',
      component: goodslist,
    },
    {
      path: '/home/goodsinfo',
      name: 'goodsinfo',
      component: goodsinfo,
    },
    {
      path: '/home/goodsinfo/swiper',
      name: 'swiper',
      component: swiper,
    },
    {
      path: '/home/numbox',
      name: 'goodbox',
      component: goodbox,
    },
    {
      path: '/goods/goodsdesc/:id',
      name: 'goodsdesc',
      component: GoodsDesc,
    },
    {
      path: '/goods/goodscomment/:id',
      name: 'goodscomment',
      component: GoodsComment,
    },
    {
      path: '/search',
      name: 'search',
      component: search,
    },    
    {
      path: '/home/photos',
      name: 'photos',
      component: photos,
    },    
    {
      path: '/shopcar',
      name: 'shopcar',
      component: shopcar,
    },    
  ]
})
